package com.zhq.blog.core.domain.game.support;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.zhq.blog.core.domain.BaseRepository;

/**
 * @title:AutoBetDetailRepository.java
 * @package com.zhq.blog.core.domain.game.support
 * @author 张恒强
 * @date 2014年12月26日 下午2:57:36
 * @version V1.0
 */
public interface AutoBetDetailRepository extends JpaRepository<AutoBetDetail, Long>
			,BaseRepository<AutoBetDetail>,JpaSpecificationExecutor<AutoBetDetail>{
	
	@Query("select a from AutoBetDetail a where a.deleted = 0 and a.autoBetId = :autoBetId and a.modelId = :modelId")
	List<AutoBetDetail> find_by_autobetId_modelId(@Param("autoBetId") long autoBetId,@Param("modelId") long modelId);
	
	@Query("select a from AutoBetDetail a where a.deleted = 0 and a.autoBetId = :autoBetId")
	List<AutoBetDetail> find_by_autobetId(@Param("autoBetId")long autoBetId);
}
